package com.cai.oamanager.service.impl;

import com.cai.oamanager.dao.StudentDao;
import com.cai.oamanager.entity.Depart;
import com.cai.oamanager.entity.People;
import com.cai.oamanager.entity.Student;
import com.cai.oamanager.entity.TT;
import com.cai.oamanager.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @version 1.0
 * @author：蔡松坡
 * @date：2021/1/16 22 : 49
 * @package：com.cai.oamanager.service.impl
 */
@Service
public class StudentServiceImpl implements StudentService {

    @Autowired
    private StudentDao studentDao;

    @Override
    public Student login(String sid, String pwd) {
        return studentDao.login(sid,pwd);
    }

    @Override
    public List<Student> getAllStudent(People people,Integer sid,Integer start,Integer size) {
        return studentDao.getAllStudent(people,sid,start,size);
    }

    @Override
    public Student getStudentById(Integer id) {
        return studentDao.getStudentById(id);
    }

    @Override
    public int getStudentCount(People people) {
        return studentDao.getStudentCount(people);
    }

    @Override
    public void updateStudent(Student student) {

    }

    @Override
    public List<Depart> getAllDepartByStudentIdOfDomain(Integer sid) {
        return studentDao.getAllDepartByStudentIdOfDomain(sid);
    }

    @Override
    public List<People> getPeopleByDepart(Integer departid) {
        return studentDao.getPeopleByDepart(departid);
    }

    @Override
    public void editStudent(Student student) {
        studentDao.editStudent(student);
    }

    @Override
    public Integer getCountByDeid(Integer deid) {
        return studentDao.getCountByDeid(deid);
    }

    @Override
    public void addStudent(Student student) {
        studentDao.addStudent(student);
    }
}
